#!/bin/sh
set -e

#获取配置的自定义参数
if [ $1 ]; then
    run_cmd=$1
fi

echo "设定远程仓库地址..."
cd /scripts
git remote set-url origin $REPO_URL
git fetch origin
git clean -f
git reset --hard
echo "git pull拉取最新代码..."
git -C /scripts pull --rebase
#echo "npm install 安装最新依赖"
#npm install --prefix /smzdm

echo "------------------------------------------------operating sh /scripts/task.sh------------------------------------------------"
sh -x /scripts/task.sh
echo "-----------------------------------------------------------------------------------------------------"

